﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace SvnFlow
{
    public class Branches
    {
        public Branches()
        {
            History = new List<HistoryItem>();
            MappedFolders = new List<FolderMap>();
        }

        public Branch Left { get; set; }
        public Branch Right { get; set; }

        public string MergeSvnProperties { get; set; }

        public List<HistoryItem> History { get; set; }
        public List<FolderMap> MappedFolders { get; set; }

        [XmlIgnore]
        public Branch this[string name]
        {
            get
            {
                switch (name)
                {
                    case "left":
                        return Left;
                    case "right":
                        return Right;
                    default:
                        throw new ArgumentException("\"name\" must be \"left\" or \"right\"");
                }
            }
        }
    }
}
